package com.ruoyi.order.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.order.mapper.MesWarehouseMapper;
import com.ruoyi.order.domain.MesWarehouse;
import com.ruoyi.order.service.IMesWarehouseService;

/**
 * 库区管理Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-01-15
 */
@Service
public class MesWarehouseServiceImpl implements IMesWarehouseService 
{
    @Autowired
    private MesWarehouseMapper mesWarehouseMapper;

    /**
     * 查询库区管理
     * 
     * @param id 库区管理主键
     * @return 库区管理
     */
    @Override
    public MesWarehouse selectMesWarehouseById(Long id)
    {
        return mesWarehouseMapper.selectMesWarehouseById(id);
    }

    /**
     * 查询库区管理列表
     * 
     * @param mesWarehouse 库区管理
     * @return 库区管理
     */
    @Override
    public List<MesWarehouse> selectMesWarehouseList(MesWarehouse mesWarehouse)
    {
        return mesWarehouseMapper.selectMesWarehouseList(mesWarehouse);
    }

    /**
     * 新增库区管理
     * 
     * @param mesWarehouse 库区管理
     * @return 结果
     */
    @Override
    public int insertMesWarehouse(MesWarehouse mesWarehouse)
    {
        mesWarehouse.setCreateTime(DateUtils.getNowDate());
        return mesWarehouseMapper.insertMesWarehouse(mesWarehouse);
    }

    /**
     * 修改库区管理
     * 
     * @param mesWarehouse 库区管理
     * @return 结果
     */
    @Override
    public int updateMesWarehouse(MesWarehouse mesWarehouse)
    {
        mesWarehouse.setUpdateTime(DateUtils.getNowDate());
        return mesWarehouseMapper.updateMesWarehouse(mesWarehouse);
    }

    /**
     * 批量删除库区管理
     * 
     * @param ids 需要删除的库区管理主键
     * @return 结果
     */
    @Override
    public int deleteMesWarehouseByIds(Long[] ids)
    {
        return mesWarehouseMapper.deleteMesWarehouseByIds(ids);
    }

    /**
     * 删除库区管理信息
     * 
     * @param id 库区管理主键
     * @return 结果
     */
    @Override
    public int deleteMesWarehouseById(Long id)
    {
        return mesWarehouseMapper.deleteMesWarehouseById(id);
    }
}
